import request from "../request/index";

const baseUrl = process.env.VUE_APP_BASE_URL;

export function QueryRole(pageIndex, pageSize) {
  return request.post(
    `${baseUrl}/Role/QueryRole`,
    {
      name: "",
      phone: "",
    },
    {
      pageIndex: pageIndex,
      pageSize: pageSize,
    }
  );
}
export function GetRole(id) {
  return request.get(`${baseUrl}/Role/GetRole?id=${id}`);
}

export function UpdateRole(role) {
  return request.post(`${baseUrl}/Role/UpdateRole`, role);
}

export function AddRole(role) {
  return request.post(`${baseUrl}/Role/AddRole`, role);
}

export function DeleteRole(role) {
  return request.post(`${baseUrl}/Role/DeleteRole`, role);
}
